package com.myc.train.business.controller.web;

import com.myc.train.business.req.DailyTrainTicketQueryReq;
import com.myc.train.business.req.DailyTrainTicketSaveReq;
import com.myc.train.business.resp.DailyTrainTicketQueryResp;
import com.myc.train.business.service.DailyTrainTicketService;
import com.myc.train.common.resp.CommonResp;
import com.myc.train.common.resp.PageResp;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/daily-train-ticket")
public class DailyTrainTicketController {


    @Autowired
    private DailyTrainTicketService dailyTrainTicketService;


    @RequestMapping("/query-list")
    public CommonResp<PageResp<DailyTrainTicketQueryResp>> queryList(@Valid DailyTrainTicketQueryReq req){
               PageResp<DailyTrainTicketQueryResp> list = dailyTrainTicketService.queryList(req);
        return new CommonResp<>(list);
    }
}
